import axi from 'axios';

export default {
  getMessagePersonApi(p) {
    return axi.get('/bhistorymessage/getMessagePerson', {
      params: p,
      headers: {
        Authorization: `Bearer ${sessionStorage.getItem('userToken')}`,
      },
    });
  },

  getAllMessageApi(p) {
    return axi.get('/bhistorymessage/getAllMessage', {
      params: p,
      headers: {
        Authorization: `Bearer ${sessionStorage.getItem('userToken')}`,
      },
    });
  },

  getPersonInfoApi(p) {
    return axi.get('/sysuser/getPersonInfo', {
      params: p,
      headers: {
        Authorization: `Bearer ${sessionStorage.getItem('userToken')}`,
      },
    });
  },
  uploadPic(p) {
    return axi.post('/auth/uploadPic', p, {
      headers: {
        Authorization: `Bearer ${sessionStorage.getItem('userToken')}`,
        'Content-Type': 'multipart/form-data',
      },
    });
  },
  sendEmailApi(p) {
    return axi.post('/auth/sendEmail', p, {
      headers: {
        Authorization: `Bearer ${sessionStorage.getItem('userToken')}`,
      },
    });
  },
};
